Skip to content

fix: display app version in More menu#97

Open
Bortlesboat wants to merge 1 commit intowebadderall:mainfrom
Bortlesboat:fix/display-app-version
Open

fix: display app version in More menu#97
Bortlesboat wants to merge 1 commit intowebadderall:mainfrom
Bortlesboat:fix/display-app-version

Conversation

@Bortlesboat
Copy link

@Bortlesboat Bortlesboat commented Mar 23, 2026

Summary

  • Add app:getVersion IPC handler in electron/ipc/handlers.ts to expose app.getVersion() to the renderer process
  • Expose getAppVersion in the preload bridge and add its type definition
  • Display the version string (e.g. "v1.1.4") at the bottom of the "More" dropdown menu in the launch window — small, gray, unobtrusive

Test plan

  • Open Recordly and click the "More" (vertical dots) button in the HUD bar
  • Verify the version number appears at the bottom of the dropdown, below the language options
  • Verify the displayed version matches the version field in package.json

Fixes #70

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • The launcher’s "more" menu now shows the app version (displayed as a small, centered, selectable "vX.Y.Z" label) for quick reference.
    • Version display is loaded when the launcher opens and fails gracefully if unavailable.

@coderabbitai
Copy link

coderabbitai bot commented Mar 23, 2026

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
Validation error: Invalid regex pattern for base branch. Received: "*" at "reviews.auto_review.base_branches[0]"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: a2994c33-6096-4fbb-8543-4521037c9a9e

📥 Commits

Reviewing files that changed from the base of the PR and between fb8cb21 and 4b7f594.

📒 Files selected for processing (4)
  • electron/electron-env.d.ts
  • electron/ipc/handlers.ts
  • electron/preload.ts
  • src/components/launch/LaunchWindow.tsx
✅ Files skipped from review due to trivial changes (1)
  • electron/ipc/handlers.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • electron/preload.ts

📝 Walkthrough

Walkthrough

Adds app version retrieval and display: a main-process IPC handler returns the app version, preload exposes electronAPI.getAppVersion, and the LaunchWindow fetches and renders v{appVersion} in the UI.

Changes

Cohort / File(s) Summary
Electron Types & Bridge
electron/electron-env.d.ts, electron/preload.ts
Added window.electronAPI.getAppVersion(): Promise<string> type and exposed getAppVersion in the preload bridge (ipcRenderer.invoke("app:getVersion")).
Main IPC Handler
electron/ipc/handlers.ts
Added ipcMain.handle('app:getVersion', () => app.getVersion()) to return the application version from the main process.
Version Display UI
src/components/launch/LaunchWindow.tsx
Added appVersion React state, a mount-only useEffect that calls window.electronAPI.getAppVersion() with cancellation guarding, error logging, and conditional rendering of a centered v{appVersion} label in the "more" dropdown.

Sequence Diagram(s)

sequenceDiagram
    participant Renderer as Renderer<br/>(LaunchWindow)
    participant Preload as Preload<br/>(electronAPI)
    participant Main as Main Process<br/>(IPC Handler)
    participant App as Electron App

    Renderer->>Renderer: useEffect on mount
    Renderer->>Preload: electronAPI.getAppVersion()
    Preload->>Main: ipcRenderer.invoke("app:getVersion")
    Main->>App: app.getVersion()
    App-->>Main: "X.Y.Z"
    Main-->>Preload: "X.Y.Z"
    Preload-->>Renderer: Promise resolves "X.Y.Z"
    Renderer->>Renderer: set appVersion and render label
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I hopped from main into the render light,
A tiny version string made my heart bright.
From app to bridge to dropdown view,
Now users see the version true.
🥕✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The description covers Summary and Test Plan but is missing key template sections like Type of Change, Screenshots/Video, and a completed Checklist. Add Type of Change checkbox, provide the requested screenshot of the version display, and complete all checklist items before merging.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: display app version in More menu' clearly and specifically describes the main change - fixing the display of the app version in the More dropdown menu.
Linked Issues check ✅ Passed The PR successfully addresses issue #70 by exposing the app version through IPC handlers, preload bridges, and displaying it in the UI, directly fixing the version mismatch problem reported.
Out of Scope Changes check ✅ Passed All changes are within scope: IPC handler setup, preload bridge exposure, TypeScript type definitions, and UI rendering of the version are all necessary and directly related to fixing issue #70.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@webadderall
Copy link
Owner

Could you attach a screenshot of what this looks like?

@webadderall
Copy link
Owner

webadderall commented Mar 24, 2026

Also, PR is not updated against main

Add IPC handler to expose app.getVersion() to the renderer and
display it in the More dropdown menu. Users can now verify which
version they're running.

Fixes webadderall#70

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Bortlesboat Bortlesboat force-pushed the fix/display-app-version branch from fb8cb21 to 4b7f594 Compare March 24, 2026 13:15
@Bortlesboat
Copy link
Author

Rebased onto main.

Re: screenshot — I don't have the native build deps to run the Electron app locally. The change adds a small v{version} label (11px, #6b6b78, centered) at the bottom of the More dropdown, below the language options. It's styled to be subtle and selectable. Happy to adjust the styling if you'd like something different once you see it in your local build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Version number not updating

2 participants